CFLAGS:= -std=c99 -ggdb -g3 -Wall
LDFLAGS:= -lcurses
SRCFILES:=$(shell find -type f -name "*.c")
HDRFILES:=$(shell find -type f -name "*.h")
OBJFILES:=$(SRCFILES:.c=.o)

GCC=gcc
LD=gcc

.PHONY: all clean

all: Sudoku

clean:
	rm ./*.o

Sudoku: $(OBJFILES)
	$(GCC) -o sudoku $(CFLAGS) $(OBJFILES) $(LDFLAGS)
	
%.o: %.c Makefile $(HDRFILES)
	$(GCC) $(CFLAGS) -c $< -o $@ $(LDFLAGS)